let $home = $("#secondPage");
let $homeTwo = $("#secondPage .slide").eq(1);
let $thirdPage = $("#thirdPage");
let data = {
  idx: "",
  src: "",
  title: "",
  price: "",
  sat: "",
  type: ""
}
$home.find(".tour").click(function() {
  data.src = $(this).find("img").eq(0).attr("src");
  data.title = $(this).find(".title").eq(0).html();
  data.price = $(this).find(".price").eq(0).html();
  data.sat = $(this).find(".sat").eq(0).html();
  data.type = $(this).find(".type").eq(0).html();
  data.idx = $(this).index();
  myFullpage.moveTo(2, 1)
  $homeTwo.find("main .pic").css({
    backgroundImage: "url(" + data.src + ")",
    backgroundSize: "cover"
  });
  $homeTwo.find("main .info .title").html(data.title);
  $homeTwo.find("main .info .price").html(data.price);
  $homeTwo.find("main .info .sat").html(data.sat);
  $homeTwo.find("main .info .type").html(data.type);
});


$homeTwo.find("main .info .btn").eq(0).click(() => {
  myFullpage.moveTo(3, 0);
  $thirdPage.find(".one main .row .list").eq(data.idx).addClass("active").siblings().removeClass("active");
  $thirdPage.find(".one main .form #text").val(
    $thirdPage.find(".one main .row .list").eq(data.idx).text()
  );
});




